import {getUserInfo} from "@/utils/format";
import ServiceEnvs from "@/services/ServiceEnvs";
import {request} from "@@/plugin-request/request";

const baseUrl = ServiceEnvs.baseUrl

// 获取子菜单
export const QuerySubMenus = (menus: string) => {
  const userInfo = getUserInfo()
  return request(baseUrl+'/api/index/cultivate-talents/education', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json;charset=utf-8',
      'Authorization': userInfo.token
    },
    data: {
      id: [menus]
    },
  })
}

// 学科填报总览
export const FillProgress = () => {
  const userInfo = getUserInfo()
  return request(baseUrl+'/api/index/show-tables', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json;charset=utf-8',
      'Authorization': userInfo.token
    },
    data: {
      data: [
        {
          univ_name: userInfo.univ_name,
          discipline_name: userInfo.discipline_name
        }
      ]
    },
  })
}
